package quik.article;

import java.io.IOException;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class GetArticle extends HttpServlet {
	
	@Override
	protected void service(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		//Servlet 상속
		String articleSeq = null;
		String path = request.getPathInfo();
		String arr[] = path.split("/");
		if(arr.length==2)
			articleSeq = arr[1];
		
		if(articleSeq!=null){
			RequestDispatcher toPage = request.getRequestDispatcher("/jsp/mypage/getArticle.jsp?article_seq="+articleSeq);
			toPage.forward(request, response);
		}
	}
}
